<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>domTest</title>

<script type="text/javascript">
<!--

function loadTest(){

	var htmlNode = document.documentElement;		//root (document) Node를 구한다.
	var htmlBody = htmlNode.lastChild;				//root의 lastChild 는 body (html 구성을 그렇게 했으니까.

	//div tag를 생성하고 텍스트를 설정해준다.
	htmlBody.appendChild( document.createElement("DIV").appendChild(document.createTextNode("testDivText")));
	
}
-->
</script>

</head>
<body onload="loadTest()">

</body>
</html>